package com.example.campuslink.viewModel

import android.content.Intent
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.example.campuslink.commen.tools.putExtraKey
import com.example.campuslink.ui.activity.PublicActivity


class TuYaViewModel:BaseViewModel() {
    private val _SeekValue = MutableLiveData<Int>(20)
    val SeekValue: LiveData<Int> = _SeekValue
    fun setSeekValue(value: Int) {
        _SeekValue.value = value
    }
    private val _isClear  = MutableLiveData<Boolean>(false)
    val isClear: LiveData<Boolean> = _isClear

    fun setClear() {
        _isClear.value = !(_isClear.value?:false)
    }
    private val _penColor = MutableLiveData<Int>(5)
    val penColor: LiveData<Int> = _penColor
    fun setPenColor(color: Int) {
        _penColor.value = color
    }

    fun jumpToInvitationPublicActivity(imagePath: String){
        startActivity(Intent().apply {
            putExtra(putExtraKey.IMAGE_PATH.key, imagePath)
            putExtra(putExtraKey.ISFROM_PHOTO.key, false)
        },
            targetClass = PublicActivity::class.java)
    }

}